Hello, I am having issue with API /signinup, it is...
# support-questions-legacy
h
Hello, I am having issue with API /signinup, it is being called twice, already looked at other discussions in here but I still don't know how to prevent I am using SuperTokens Core (Managed) v7.0, front-end I am using React with "supertokens-auth-react": "0.31.5", back-end is ExpressJS with "supertokens-node": "13.6.0"
r
hey @hwihwi6108 are you using our pre built UI or custom UI?
h
I will share the code
r
also, whats the error stack on the backend sdk?
h
invalid_grant
r
right.
h
this is BE implementation: import { env } from './env.config'; export const SuperTokensConfig: TypeInput = { framework: 'express', supertokens: { // this is the location of the SuperTokens core. connectionURI: env.supertokens.connectionUri, apiKey: env.supertokens.apiKey, }, appInfo: { appName: 'Test', apiDomain: env.supertokens.apiDomain, websiteDomain: env.supertokens.websiteDomain, apiBasePath: '/v1/auth', websiteBasePath: '/auth', }, recipeList: [ ThirdPartyPasswordless.init({ providers: [ ThirdPartyPasswordless.Google({ clientId: env.google.clientId, clientSecret: env.google.clientSecret, scope: [ 'https://www.googleapis.com/auth/user.birthday.read', 'https://www.googleapis.com/auth/user.gender.read', 'https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email', ], }), customFacebook({ clientId: env.facebook.clientId, clientSecret: env.facebook.clientSecret, scope: ['user_birthday', 'user_gender'], }), customKakao(env.kakao), ], contactMethod: 'EMAIL_OR_PHONE', flowType: 'USER_INPUT_CODE_AND_MAGIC_LINK', }), Session.init({ cookieSecure: true, }), Dashboard.init(), UserMetadata.init(), ], };
r
are you using our pre built UI on the frontend?
h
yes, here is mine function App(): JSX.Element { return ( <ThirdpartyPasswordlessComponentsOverrideProvider components={{ ThirdPartyPasswordlessHeader_Override: ({ DefaultComponent, ...props }) => { return ; }, }} > {
Copy code
:root {
                --store-theme-color: ${theme.color};
              }
} {getSuperTokensRoutesForReactRouterDom(require('react-router-dom'))} <Route path="/menus" element={}> ); } export default App;
I use <ThirdpartyPasswordlessComponentsOverrideProvider components={{ ThirdPartyPasswordlessHeader_Override: ({ DefaultComponent, ...props }) => { return ; }, }} >
r
right. So our pre built UI doesn't query the endpoint twice unless something in your code causes our component to remount. So you might want to check what might be causing that.
h
Got it, I will try to check more
8 Views